package com.example.asus.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

public class DatallActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_datall);
        //获取传过来的意图

       Intent intent= getIntent();
       //从意图中获取数据
       int postion =intent.getIntExtra("position",0);

       String id=intent.getStringExtra("id");
        String name=intent.getStringExtra("name");
        String price=intent.getStringExtra(" price");
        String desc=intent.getStringExtra("desc");
        String pic=intent.getStringExtra("pic");
        String hot=intent.getStringExtra("hot");
        String sour=intent.getStringExtra("sour");
        String vegetable=intent.getStringExtra("vegetable");
        String meat=intent.getStringExtra("meat");

        Toast.makeText(this,""+id+postion+name+price+desc+pic+hot+sour+vegetable+meat,Toast.LENGTH_SHORT).show();

    }
}
